package cn.edu.gzist.chapter07.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;


@Controller
@RequestMapping("book/admin")
public class ManagerController {

    @RequestMapping("manag")
    public String manage(){
        return "book_manag";
    }
    @PreAuthorize("hasRole('ADMIN')")
    @RequestMapping("delete")
    public String delete(String id) {
        System.out.println(id);
        return "redirect:manag";
    }
    
}
